package com.example.shiyansan.service.impl;


import com.example.shiyansan.entity.Book;

import com.example.shiyansan.mapper.BookMapper;
import com.example.shiyansan.result.Result;
import com.example.shiyansan.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {

    /**
     * 查询所有的book列表
     * @return
     */
    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> findBookList() {
        return bookMapper.findBookList();
    }

    @Override
    public Book findBookById(int id) {
        return bookMapper.findBookById(id);
    }

    @Override
    public void updateBook(Book book) {
        bookMapper.updateBook(book);
    }
}
